<template>
  <div id="cc" style="width:74.5;height: 391px;"></div>
</template>

<script>
import * as echarts from "echarts";
export default {
  data() {
    return {};
  },

  mounted() {
    this.datalist();
  },

  methods: {
    datalist() {
      // console.log(" this.Alldata");
      // 基于准备好的dom，初始化echarts实例
      var myChart = echarts.init(document.getElementById("cc"));

      // 指定图表的配置项和数据
      var option;

      option = {
        xAxis: {
          type: "category",
          data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
        },
        yAxis: {
          type: "value"
        },
        series: [
          {
            data: [120, 200, 150, 80, 70, 110, 130],
            type: "bar"
          }
        ]
      };

      // 使用刚指定的配置项和数据显示图表。
      myChart.setOption(option);
    }
  }
};
</script>

<style></style>
